#pragma once

#include "CNoParentShareableDependencyObject.h"
#include "XamlQualifiedObject.h"

class CTemplateContent;

class CFrameworkTemplate :
	public CNoParentShareableDependencyObject
{

public: 
	CFrameworkTemplate(CCoreServices * pCore);
protected: 
	CFrameworkTemplate();
public: 
	static HRESULT Create(CDependencyObject * * ppObject, CREATEPARAMETERS * pCreate);
	virtual ~CFrameworkTemplate();
	virtual XBOOL ParticipatesInManagedTreeInternal();
	void SetHasEventRoot(XBOOL fNewValue);
	virtual XUINT32 GetTypeIndex() const;
	virtual HRESULT LoadContent(CDependencyObject * * pResult, CDependencyObject * pTemplatedParent);
protected: 
	virtual HRESULT LoadContent(CDependencyObject * * ppResult, CDependencyObject * pTemplatedParent, XBOOL bRegisterNamesInTemplateNamescope);
protected: 
	XBOOL HasTemplateContent();
public: 
	HRESULT AddGroups(CXString *, CXString *);
	HRESULT OnObjectCreated(const xshared_ptr<XamlQualifiedObject> & qoRoot, const xshared_ptr<XamlQualifiedObject> & qoNewInstance, CDependencyObject * pTemplatedParent);
private: 
	XBOOL m_fHasEventRoot;
public: 
	CXString * m_pTempXaml;
	struct IValueStore * m_pResourcesForOriginalScope;
	struct IValueStore * m_pVisualStateStore;
	CTemplateContent * m_pTemplateContent;

};